import request from '@/utils/request'

// 获取菜单树形列表
export function findMenuTree() {
  return request({
    url: '/auth/menu/findMenuTree',
    method: 'get'
})
};

// 获取菜单列表
export function getMenuList(params) {
  return request({
    url: '/auth/menu/list',
    method: 'get',
    params
  })
};

// 获取菜单详情
export function getMenu(id) {
  return request({
    url: '/auth/menu/get/' + id,
    method: 'get'   
  })
};

// 保存菜单
export function saveMenu(data) {
  return request({
    url: '/auth/menu/save',
    method: 'post',
    data
  })
};

// 物理删除菜单
export function deleteMenu(id) {
  return request({
    url: '/auth/menu/delete/' + id,
    method: 'delete'
  })
};

// 逻辑删除菜单
export function deleteByLogic(id) {
  return request({
    url: '/auth/menu/deleteByLogic/' + id,
    method: 'delete'
  })
};
